﻿<%@ Page Title="" Language="C#" MasterPageFile="~/masterPage.Master" AutoEventWireup="true" CodeFile="ckNews.aspx.cs" Inherits="ckNews" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
    DataSourceID="SqlDataSourceNews" EnableModelValidation="True" Width="505px">
    <Columns>
        <asp:HyperLinkField DataNavigateUrlFields="xwID" 
            DataNavigateUrlFormatString="newsView.aspx?newsID={0}" DataTextField="xwName" 
            HeaderText="标题" />
        <asp:BoundField DataField="u_Name" HeaderText="作者" 
            SortExpression="u_Name" />
        <asp:BoundField DataField="xwTime" HeaderText="发布时间" 
            SortExpression="xwTime" />
    </Columns>
</asp:GridView>
<asp:SqlDataSource ID="SqlDataSourceNews" runat="server" 
    ConnectionString="<%$ ConnectionStrings:LabInfoManageSystemConnectionString %>" 
    
    SelectCommand="SELECT xwgg.xwID, xwgg.xwName, userInfo.u_Name, xwgg.xwTime FROM userInfo INNER JOIN xwgg ON userInfo.zID = xwgg.xwAuthor WHERE (xwgg.xwClass = @xwClass)">
    <SelectParameters>
        <asp:QueryStringParameter Name="xwClass" QueryStringField="classID" 
            Type="String" />
    </SelectParameters>
</asp:SqlDataSource>
</asp:Content>

